package com.example.index.web.feign;


import com.example.index.web.User;
import lombok.AllArgsConstructor;
import lombok.Data;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Date;

//@FeignClient("user")
@FeignClient(name="user",fallback = UserActionHystrix.class)
public interface IUserAction {
    @RequestMapping("user")
    public String user();

    @RequestMapping("hello")
    public String hello(@RequestParam("name") String name);

    @RequestMapping("add")
    public int add(@RequestParam("a")int a,@RequestParam("b")int b);
    @RequestMapping("reg")
    public User reg(@RequestBody User user);

    @RequestMapping("path/{ptest}")
    public String ptest(@PathVariable("ptest") String ptest);
}



